package edu.sctu.nieyu.day20150521.texttwo;

/**
 * Created by user01 on 2015/5/21.
 */
public class Rectangular extends Message implements Iput {

    float a = 1.5f;
    float b = 3.5f;

    @Override
    public void perimeter() {

        float c;
        c = a+b;
        System.out.println("周长："+c);
    }

    @Override
    public void area() {
        float s;
        s = a*b;
        System.out.println("面积："+s);

    }

    @Override
    public void getMessage() {
        System.out.println("矩形：");
        Message r = new Rectangular();
        r.perimeter();
        r.area();




    }
}
